﻿using System;
using System.Windows.Forms;
using CalcSharp.Core.Containers;
using CalcSharp.Core.IO;

namespace CalcSharp.Core.Plugin
{
    /// <summary>
    /// The Plugin Host. Implemented in plugin runner Application
    /// </summary>
    public interface IPluginHost
    {
        Form Parent { get; }
        MatrixManager Mtrx_mem { get; }
        FloatManager Mem { get; }
        ComplexManager CPLX_mem { get; }
        SetManager Set_mem { get; }
        CFsManager C_fs { get; }
        StringManager String_mem { get; }
        bool Register(ICMDPlugin ipi);
        bool Register(IWindowPlugin ipi);

        //API
        void write(string str);
        void writeln(string str);
        void ExecCommands(string cmd);
        Tresult RunOneCommand(string cmd);
        void ClearConsole();
        CalculatorModes CalcMode { get; }
        ConsoleTextColor TextColor { get; set; }
        string[] CmdArray { get; }
        bool CmdExists(string cmd);
        Version HostVersion { get; }
        AMatrix CreateMatrix(int Rows, int Columns);
        FlagRegister Flags { get; }
    }

    public enum ConsoleTextColor
    {
        NormalText,
        TextOK,
        TextError,
        TextWarning
    }
}
